<template>
  <div class="app-container">
    <AppHeader v-if="showHeader" title="双赢招聘平台" />
    <div class="main-content">
      <router-view/>
    </div>
  </div>
</template>

<script setup>
import AppHeader from './components/Header.vue'
import { useRoute } from 'vue-router'
import { computed } from 'vue'

const route = useRoute()
const showHeader = computed(() => !route.meta.requiresAdmin)
</script>

<style>
body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f0f2f5;
}

.app-container {
  background-image: url('./assets/images/login-bg.png');
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-color: #f0f2f5;
}

.main-content {
  flex: 1;
  margin-top: 60px; /* 为Header预留的空间 */
  padding: 20px;
}
</style>


